# Maintainer: Alexey Pavlov <Alexpux@gmail.com>

pkgname=gnome-doc-utils
pkgver=0.20.10
pkgrel=1
pkgdesc="Documentation utilities for Gnome"
arch=('any')
license=('GPL' 'LGPL')
depends=('libxslt' 'python2' 'docbook-xml' 'rarian')
makedepends=('intltool' 'libxml2-devel' 'libxslt-devel' 'libxml2-python')
url="https://www.gnome.org"
source=(https://download.gnome.org/sources/$pkgname/${pkgver%.*}/$pkgname-$pkgver.tar.xz
        0.18.0-abs_top_srcdir.patch
        msysize.patch)
sha256sums=('cb0639ffa9550b6ddf3b62f3b1add92fb92ab4690d351f2353cffe668be8c4a6'
            '39cb4c5c1fdc59f3d03ce4362d579d216c1ac3910c1e8c5b1b4d052f63e447b3'
            'db5db69b298fe27a29cb1c72ae2737f79bf04cbe871a98ceb9d1389865a31acd')

prepare() {
  cd "$pkgname-$pkgver"
  patch -p2 -i ${srcdir}/0.18.0-abs_top_srcdir.patch
  patch -p1 -i ${srcdir}/msysize.patch
}

build() {
  cd "$pkgname-$pkgver"
  PYTHON=/usr/bin/python2 ./configure --prefix=/usr \
      --sysconfdir=/etc --mandir=/usr/share/man \
      --localstatedir=/var --disable-scrollkeeper
  make
}

package() {
  cd "$pkgname-$pkgver"
  make DESTDIR="$pkgdir" install
}
